let values = require('postcss-modules-values');
let path = require('path');
module.exports = {
    entry: './index.js',

    resolve: {
        extensions: ["", ".js"],
        alias: {
            model: path.join(__dirname, "src/models"),
            component: path.join(__dirname, "src/components")
        }
    },

    output: {
        filename: 'bundle.js',
        publicPath: ''
    },

    module: {
        loaders: [
            {
                test: /\.js$/,
                exclude: /node_modules/,
                loader: 'babel-loader',
                query: {
                    presets:['es2015','react','stage-0']
                }
            },
            {
                test: /\.css$/,
                loaders: [
                    'style?sourceMap',
                    'css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]!postcss-loader'
                ]
                // loader: "style-loader!css-loader?modules&localIdentName=[path][name]---[local]---[hash:base64:5]!postcss-loader"
            },
        ]
    },
    postcss: [
        values
    ]
}
